﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using StyleMVVM.DependencyInjection;
using StyleMVVM.UnitTests.TestClasses.SimpleObjects;

namespace StyleMVVM.UnitTests.TestClasses.SimpleObjects
{
	[Export]
	public class LazyImportClass
	{
		private readonly Lazy<IExportByInterfaceClass> export;
		private Lazy<IList<ICollectionExport>> collectionExports;

		[ImportConstructor]
		public LazyImportClass(Lazy<IExportByInterfaceClass> export)
		{
			this.export = export;
		}

		public IExportByInterfaceClass Export
		{
			get { return export.Value; }
		}

		public IEnumerable<ICollectionExport> Exports
		{
			get { return collectionExports.Value; }
		}

		[Import]
		public Lazy<IGenericTestInterface<int>> GenericImport { get; set; }

		[ImportMethod]
		public void Insert(Lazy<IList<ICollectionExport>> collectionExports)
		{
			this.collectionExports = collectionExports;
		}
	}
}